// components/audio_mug/audio_mug.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    // poster: 'http://m701.music.126.net/20210528154747/05a1c985caa57ab2f1ce36613ad958c9/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/9160286346/614b/abbe/bba0/ab11531294547e454dc76e3a9b5fdd56.mp3',
    // name: '此时此刻',
    // author: '许巍',
    // src: 'http://m701.music.126.net/20210528154747/05a1c985caa57ab2f1ce36613ad958c9/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/9160286346/614b/abbe/bba0/ab11531294547e454dc76e3a9b5fdd56.mp3',
  
  },

  /**
   * 组件的方法列表
   */
  methods: {
    audioPlay: function () {
      this.audioCtx.play()
    },
    audioPause: function () {
      this.audioCtx.pause()
    },
    audio14: function () {
      this.audioCtx.seek(14)
    },
    audioStart: function () {
      this.audioCtx.seek(0)
    },
    onReady: function (e) {
      // 使用 wx.createAudioContext 获取 audio 上下文 context
      this.audioCtx = wx.createAudioContext('myAudio')
    }
  }
})
